<%--
  Created by IntelliJ IDEA.
  User: gongsir
  Date: 2019/8/21
  Time: 15:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    pageContext.setAttribute("path",request.getContextPath());
%>
<html>
<head>
    <meta charset="utf-8">
    <title>ckPlayer</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${path}/static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${path}/static/css/admin.css" media="all">
    <script type="text/javascript" src="${path}/static/layui/layui.all.js"></script>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <div class="layui-container">
                <div class="layui-row layui-col-space15 margin15">
                    <section class="layui-card">
                        <div class="layui-card-header">
                            <h3 style="text-align: center">正在播放: ${mv.name} - ${mv.action}</h3>
                        </div>
                        <div class="layui-card-body">
                            <div class="video" id="video" data-url="${mv.movieUrl}" style="width: 100%;"></div>
                        </div>
                    </section>
                </div>
        </div>
    </div>

    <!-- video播放js -->
    <script type="text/javascript">
        layui.config({
            base: '${path}/static/lib/'
        }).extend({
            ckplayer: 'ckplayer/ckplayer'
        }).use(['jquery', 'ckplayer'], function() {
            var $ = layui.$,
                ckplayer = layui.ckplayer;
            var vUrl = $('#video').data('url'),
                videoObject = {
                    container: '#video',
                    loop: true,
                    autoplay: true,
                    video: [
                        [vUrl, 'video/mp4']
                    ]
                };
            var player = new ckplayer(videoObject);
        });
    </script>
</body>
</html>
